import {NgModule} from '@angular/core';
import {Routes, RouterModule} from '@angular/router';

import {LoginGuard} from './login/focusGuard';

const routes: Routes = [
  {path: '', loadChildren: './login/login.module#LoginModule'},
  {path: 'main', loadChildren: './main/main.module#MainModule', canActivate: [LoginGuard]},
  {path: '**', redirectTo: '', pathMatch: 'full'}
];

@NgModule({
  imports: [RouterModule.forRoot(routes)],
  exports: [RouterModule]
})
export class AppRoutingModule {
}
